import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [

  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login/index.vue')
  },
  {
    path: '/mobile',
    name: 'mobile',
    component: () => import('../views/Mobile/mobile.vue')
  },
  {
    path: '/visualspectrahub',
    name: 'visualspectrahub',
    component: () => import('../views/visualspectrahub/index.vue')
  },
  {
    path: '/main',
    name: 'index',
    component: () => import('../views/Main/main.vue'),
    children: [
      {
        path: '',
        name: 'overflow',
        component: () => import('../views/Overflow/index.vue')
      },
      {
        path: 'realTimeVideo',
        name: 'realTimeVideo',
        component: () => import('../views/RealTimeVideo/index.vue')
      },
      {
        path: 'settingEquipment',
        name: 'settingEquipment',
        component: () => import('../views/Setting_equipment/index.vue')
      },
      {
        path: 'settingWarning',
        name: 'settingWarning',
        component: () => import('../views/Setting_warning/index.vue')
      },
      {
        path: 'statistic',
        name: 'statistic',
        component: () => import('../views/Statistic/index.vue')
      },
      {
        path: 'warning',
        name: 'warning',
        component: () => import('../views/Warning/index.vue')
      },
      {
        path: 'orientation',
        name: 'orientation',
        component: () => import('../views/Orientation/index.vue')
      }
    ]
  },


]

const router = createRouter({
  history: createWebHashHistory(process.env.BASE_URL),
  routes
})
router.beforeEach((to, from) => {

})

export default router
